package com.ssy.lingxi.purchase.entity.tender;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 招标发布商城表
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/3/1
 */
@Getter
@Setter
@Entity
@Table(schema = "public", name = "purchase_invite_tender_shop")
public class InviteTenderShop implements Serializable {
    private static final long serialVersionUID = 6129803292912926906L;
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="invite_tender_shop_seq")
    @SequenceGenerator(sequenceName="purchase_invite_tender_shop_seq", name="invite_tender_shop_seq",allocationSize = 1)
    private Long id;

    /**
     * 招标id
     */
    @JsonIgnore
    @ManyToOne(cascade = {CascadeType.PERSIST})
    @JoinColumn(name="inviteTenderId",referencedColumnName = "id")
    private InviteTender inviteTender;

    /**
     * 商城id
     */
    @Column(columnDefinition = "int", nullable = false)
    private Long shopId;

    /**
     * 商城类型：1.企业商城 2.积分商城 3.渠道商城 4.渠道自有商城 5.渠道积分商城 6.采购门户
     * 详见 ShopTypeEnum
     */
    @Column(columnDefinition = "int", nullable = false)
    private Integer type;

    /**
     * 商城环境:1.web 2.H5 3.小程序 4.APP
     */
    @Column(columnDefinition = "int", nullable = false)
    private Integer environment;

}
